﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ivy.UserRegistration.Entity;


namespace Ivy.UserRegistration.IBusinessLogic
{
    public interface IUserRegistrationBus
    {
        #region UserRegistration and profile update
        bool RegisterNewUser(User UserEntity);
        bool SendVerificationCodeEmail(User UserEntity);
        bool SendVerificationCodeForForgetPasswordEmail(User UserEntity);
        bool UpdateRegisteredUser(User UserEntity);
        bool SaveUserProfile(UserProfile UserProfileEntity);
        bool IsLoginIDExisting(string UserLoginID);
        bool IsUserVerified(string UserLoginID);
        User GetUserByLoginID(string UserLoginID);
        bool Login(string UserLoginID, string Password); 
        UserProfile GetUserProfileByID(string UserID);
        User GetUserByPrimaryEmailId(string UserPrimaryEmailId);
        List<User> GetAllUser();
        List<UserProfileReportList> GetAllRegisterdUserProfileList();
        bool IsUserHavingAdministratorAuthorization(int UserKey);
        bool IsUserHavingContentUpdateAuthorization(int UserKey, int ContentKey, string ActivityTypeCode, string ContentTypeCode);
        UserProfileReportList GetUserProfileDetailsByUserKey(int UserKey);
        #endregion UserRegistration and profile update

        #region Sys_LoginHistoryLog
        bool RegisterUserLoginHistory(Sys_LoginHistoryLog Sys_LoginHistoryLogEntity);
        bool UpdateRegisteredUserLoginHistory(Sys_LoginHistoryLog Sys_LoginHistoryLogEntity);
        Sys_LoginHistoryLog GetUserLoginHistoryByLoginKey(int LoginKey);
        #endregion Sys_LoginHistoryLog

        #region User Society and Role management
        /// <summary>
        /// 
        /// </summary>
        /// <param name="UserKey"></param>
        /// <param name="SocietyKey"></param>
        /// <param name="RoleKey"></param>
        /// <returns></returns>
        bool AssignSocietyAndRoleToUser(int UserKey, int SocietyKey, int RoleKey);

        /// <summary>
        /// 
        /// </summary>
        /// <param name="UserKey"></param>
        /// <param name="SocietyKey"></param>
        /// <param name="RoleKey"></param>
        /// <returns></returns>
        bool RemoveSocietyAndRoleFromUser(int UserKey, int SocietyKey, int RoleKey);

        

        /// <summary>
        /// This method will be used to retreive the list of Roles associated with the selected user.
        /// GetAllRolesForSelectedUser(UserKey);
        /// </summary>
        /// <param name="UserKey"></param>
        /// <returns></returns>
        List<UserRole> GetAllRolesForSelectedUser(int UserKey);


        
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Rolekey"></param>
        /// <returns></returns>
        Sys_RoleMaster GetSelectedSys_RoleMasterByID(int Rolekey);
        #endregion User Society and Role management

        #region UserProfileImage
        bool SaveUserProfileImage(UserProfileImage UserProfileImageEntity);
        //bool RegisterNewUserProfileImage(UserProfileImage UserProfileImageEntity);
        //bool UpdateRegisteredUserProfileImage(UserProfileImage UserProfileImageEntity);
        UserProfileImage GetUserProfileImageByUserKey(int Userkey);
        #endregion

        #region Sys_SessionLog
        bool SaveUserSys_SessionLogDetails(Sys_SessionLog lSys_SessionLogEntity);
        List<Sys_SessionLog> GetAllSys_SessionLogDetails();
        #endregion

        #region ProjectMemberMaster
        bool SaveProjectMemberDetails(ProjectMemberMaster lProjectMemberMasterEntity);
        bool UpdateProjectMemberDetails(ProjectMemberMaster lProjectMemberMasterEntity);
        ProjectMemberMaster GetProjectMemberDetailsByKey(int ProjectMemberKey);
        List<ProjectMemberMaster> GetAllProjectMemberDetails();
        #endregion
    }
}
